/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

/**
 * @author 黑名单
 *
 */
public class BlackIpInfo implements RowMapper<BlackIpInfo> {

	private int id;

	// ip地址
	private String ipAddress;

	// ip所属区域
	private String area;

	// 使用次數
	private int useCount;

	// 使用狀態 (1:允许访问，2：禁止访问)
	private int useStatus;
	
	private String searchContent;
	

	public String getSearchContent() {
		return searchContent;
	}

	public void setSearchContent(String searchContent) {
		this.searchContent = searchContent;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public void setIpAddress(String ipAddress) {
		this.ipAddress = ipAddress;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public int getUseCount() {
		return useCount;
	}

	public void setUseCount(int useCount) {
		this.useCount = useCount;
	}

	public int getUseStatus() {
		return useStatus;
	}

	public void setUseStatus(int useStatus) {
		this.useStatus = useStatus;
	}

	public BlackIpInfo mapRow(ResultSet rs, int rowNum) throws SQLException {

		BlackIpInfo info = new BlackIpInfo();
		info.setId(rs.getInt("id"));
		info.setArea(rs.getString("area"));
		info.setIpAddress(rs.getString("ip_address"));
		info.setUseCount(rs.getInt("use_count"));
		info.setUseStatus(rs.getInt("use_status"));
		return info;
	}

}
